import jsonschema

json_data = {
    "success": True,
    "code": 10000,
    "message": "操作成功"
}

schema = {
    "type": "object",
    "properties": {"success": {"const": True},
                   "code": {"const": 10000},
                   "message": {"const": "操作成功"}
                   }
}

res = jsonschema.validate(instance=json_data,schema=schema)

print("校验结果",res)